Sets the mouse cursor icon for a GUI window.
GUISetCursor ( [cursorID [, override [, winhandle]]] )
Parameters
cursorID | [optional] Cursor Id (See Remarks). |
override | [optional] Force the requested mouse cursor even when over controls (see below). 0 = (default) Don't override a control's default mouse cursor. 1= override control's default mouse cursor. |
winhandle | [optional] Windows handle as returned by GUICreate (default is the previously used Window). |
Return Value
Success: | Returns 1. |
Failure: | Returns 0. |
Remarks
If the cursorID is invalid the standard arrow will be displayed.
Related
GUICtrlSetCursor
Example
#include <GUIConstants.au3>
$IDC = -1
$newIDC = 0
HotkeySet("{Esc}", "Increment")
GUICreate("Press Esc to Increment", 400, 400,0,0,0x04CF0000, 0x00000110)
GUISetState ()
While GUIGetMsg()<> $GUI_EVENT_CLOSE
If $newIDC <> $IDC Then
$IDC = $newIDC
GUISetCursor($IDC)
EndIf
ToolTip("GUI Cursor #" & $IDC)
WEnd
Exit
Func Increment()
$newIDC = $IDC + 1
If $newIDC > 15 Then $newIDC = 0
EndFunc